<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta
      id="MP"
      name="viewport"
      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
    />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="renderer" content="webkit" />
    <!-- 启用360浏览器的极速模式(webkit) -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <!-- 避免IE使用兼容模式 -->
    <meta name="screen-orientation" content="portrait" />
    <meta name="x5-orientation" content="portrait" />
    <meta name="full-screen" content="yes" />
    <meta name="x5-fullscreen" content="true" />
    <meta name="x5-page-mode" content="app" />
    <meta name="browsermode" content="application" />
    <meta name="msapplication-tap-highlight" content="no" />
    <meta http-equiv="x-rim-auto-match" content="none" />
    <meta name="msapplication-tap-highlight" content="no" />
    <!-- <link href='https://map.sgcc.com.cn/api/epgis-1.5.0.css' rel='stylesheet' /> -->
    <!-- <link rel="stylesheet" href="../public/static/example/example/css/demo.css"> -->
    <link rel="stylesheet" href="css/demo.css" />
    <link
      rel="stylesheet"
      href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
      integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
      crossorigin=""
    />

    <script src="./static/kriging.js"></script>
    <script src="./static/data.js"></script>
    <script src="./static/world.js"></script>
    <script
      src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"
      integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM="
      crossorigin=""
    ></script>
    <script type="text/javascript" src="./static/libwind.min.js"></script>
    <script
      type="text/javascript"
      src="./static/leaflet.ChineseTmsProviders.js"
    ></script>

    <script
      type="text/javascript"
      src="./static/leaflet.mapCorrection.min.js"
    ></script>

    <script src="./static/jquery-2.2.4.min.js"></script>

    <script src="https://map.sgcc.com.cn/maps?v=3.0.0"></script>
    <script src="./static/example/example/libs/axios.min.js"></script>

    <script src="/static/example/example/libs/egis-V2.min.js"></script>
    <script src="./static/example/example/libs/layerStyle.js"></script>
    <script src="./static/example/example/libs/httpService.js"></script>

    <script src="./static/example/example/js/demo.js"></script>

    <script src="./static/iscpdemo.js"></script>
    <!-- 汉字转拼音 -->
  
    <script type="text/javascript" src="./static/config.js"></script>
    <script src="https://webapi.amap.com/maps?v=2.0&key=dced9864cccfa215c03a7e607529ec2a"></script>
    <script
      src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js"
      integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM="
      crossorigin=""
    ></script>
    <!-- <script src="./static/sm3.js"></script> -->

    <!-- <script src='https://map.sgcc.com.cn/api/epgis-js-1.5.0.min.js'></script> -->
  </head>

  <body>
    <div id="app"></div>
    
    <!-- built files will be auto injected -->
    <script>
      //******原生方法******
      //返回
      function MobileBackNative() {
        JSInterface.AndroidBackNative()
      }
      //是否在光大家打开
      function MobileIsInApp() {
        var is = JSInterface.AndroidLoadInApp()
        return is
      }
         // 成功回调函数，获取位置信息
         function successCallback(position) {
          var latitude = position.coords.latitude; // 获取纬度
          var longitude = position.coords.longitude; // 获取经度

          var locationInfo = "纬度: " + latitude + ", 经度: " + longitude;
          console.log(locationInfo, "11111111111");
        }

        // 失败回调函数，处理错误信息
        function errorCallback(error) {
          var errorMessage;
          switch (error.code) {
            case error.PERMISSION_DENIED:
              errorMessage = "用户拒绝了位置信息共享";
              
              break;
            case error.POSITION_UNAVAILABLE:
              errorMessage = "无法获取当前位置";
              break;
            case error.TIMEOUT:
              errorMessage = "获取位置信息超时";
              break;
            case error.UNKNOWN_ERROR:
              errorMessage = "发生未知错误";
              break;
          }
          console.log(errorMessage);
        
        }
   
        // 获取用户位置信息
        function getLocation() {
          if (navigator.geolocation) {
            navigator.geolocation.getCurrentPosition(
              successCallback,
              errorCallback
            );
          } else {
            console.log("浏览器不支持地理位置信息功能");
          }
        }
        
        // 在页面加载时自动获取用户位置信息
        window.addEventListener("load", getLocation);
    </script>
    <script type="module" src="/src/main.js"></script>
  </body>
</html>
